From fcc3c1291970f115315e24a9281ad3ac94388a12 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 6 Feb 2020 16:23:11 +0100 Subject: [PATCH] gtk_css_style_snapshot_icon_paintable: Fix uninitialized memory access We were reading the foreground color alpha even when we didn't read it. --- gtk/gtkrendericon.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gtk/gtkrendericon.c b/gtk/gtkrendericon.c index ddb889642c..a434c73010 100644 --- a/gtk/gtkrendericon.c +++ b/gtk/gtkrendericon.c @@ -114,10 +114,12 @@ gtk_css_style_snapshot_icon_paintable (GtkCssStyle *style, is_icon_paintable = GTK_IS_ICON_PAINTABLE (paintable); if (is_icon_paintable) - gtk_icon_theme_lookup_symbolic_colors (style, &fg, &sc, &wc, &ec); + { + gtk_icon_theme_lookup_symbolic_colors (style, &fg, &sc, &wc, &ec); - if (fg.alpha == 0.0f) - goto transparent; + if (fg.alpha == 0.0f) + goto transparent; + } if (transform == NULL) { -- 2.30.2